package graphics.Meshes;

import common.Point3D;

public class Edge {
	Point3D p0 = null;
	Point3D p1 = null;
	Point3D pm = null;
	
	public Edge(Point3D p0, Point3D p1){
		this.p0 = p0;
		this.p1 = p1;
	}

	@Override
	public int hashCode() {
		return p0.hashCode() + p1.hashCode();
	}
	

	public Point3D getP0() {
		return p0;
	}

	public void setP0(Point3D p0) {
		this.p0 = p0;
	}

	public Point3D getP1() {
		return p1;
	}

	public void setP1(Point3D p1) {
		this.p1 = p1;
	}

	public Point3D getPm() {
		return pm;
	}

	public void setPm(Point3D pm) {
		this.pm = pm;
	}
	
	
	public boolean isMidpointDefined(){
		return (pm != null);
	}


	
}
